package Judge;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.example.sports_meet.R;

import java.util.Objects;

public class Judge_mainActivity extends AppCompatActivity implements View.OnClickListener {
    private Button search_btn, del_btn, insert_btn, update_btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_judge_main);
        init();
        Objects.requireNonNull(getSupportActionBar()).hide();

    }

    private void init() {
        search_btn = (Button) findViewById(R.id.search_btn);
        del_btn = (Button) findViewById(R.id.del_btn);
        insert_btn = (Button) findViewById(R.id.insert_btn);
        update_btn = (Button) findViewById(R.id.update_btn);

        search_btn.setOnClickListener(this);
        del_btn.setOnClickListener(this);
        insert_btn.setOnClickListener(this);
        update_btn.setOnClickListener(this);
    }

    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.search_btn:
                Intent intent2 = new Intent(this, Judge_search.class);
                startActivity(intent2);
                break;
            case R.id.insert_btn:
                Intent intent3 = new Intent(this, Judge_add.class);
                startActivity(intent3);
                break;
            case R.id.del_btn:
                Intent intent4 = new Intent(this, Judge_del.class);
                startActivity(intent4);
                break;
            case R.id.update_btn:
                Intent intent5 = new Intent(this, Judge_update.class);
                startActivity(intent5);
                break;


        }
    }
}
